home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1996 April / Macworld (1996-04).dmg / Educational Demos / Goldilocks Gamebook / Goldilocks.DIR / 00538_Script_538 < prev    next >
Text File  |  1995-11-20  |  637b  |  26 lines

  1. -- Go Game
  2.  
  3. on mouseDown 
  4.   global MC
  5.   puppetSound "Click.AIF"
  6.   put mouseCast() into MC  
  7.   repeat while stillDown() = 1    
  8.     if mouseCast() = MC then      
  9.       set the castNum of sprite (the ClickOn) to MC +1      
  10.       updateStage 
  11.       next repeat    
  12.     end if    
  13.     if (mouseCast() <> MC + 1) then set the castNum of sprite (the ClickOn) to MC    
  14.     updateStage 
  15.   end repeat 
  16. end
  17.  
  18. on mouseUp
  19.   global MC,pageCount,theGame
  20.   set the castNum of sprite (the clickOn) to MC  
  21.   updateStage
  22.   if the mouseCast = MC or the mouseCast = MC + 1 then   
  23.     resetAll
  24.     go to "GameIntro"
  25.   end if 
  26. end